import { name } from "file-loader";

const datePickerOptions = {
  disabledDate(time) {
    return time.getTime() > Date.now();
  },
  shortcuts: [
    {
      text: "今天",
      onClick(picker) {
        picker.$emit("pick", new Date());
      }
    },
    {
      text: "昨天",
      onClick(picker) {
        const date = new Date();
        date.setTime(date.getTime() - 3600 * 1000 * 24);
        picker.$emit("pick", date);
      }
    },
    {
      text: "一周前",
      onClick(picker) {
        const date = new Date();
        date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
        picker.$emit("pick", date);
      }
    },
    {
      text: "一年前",
      onClick(picker) {
        const date = new Date();
        date.setFullYear(date.getFullYear() - 1);
        picker.$emit("pick", date);
      }
    },
    {
      text: "两年前",
      onClick(picker) {
        const date = new Date();
        date.setFullYear(date.getFullYear() - 2);
        picker.$emit("pick", date);
      }
    },
    {
      text: "三年前",
      onClick(picker) {
        const date = new Date();
        date.setFullYear(date.getFullYear() - 3);
        picker.$emit("pick", date);
      }
    }
  ]
};

const tabList = [
  { name: "基本信息", id: 0 },
  { name: "纳税信息", id: 1 },
  { name: "开票信息", id: 2 },
  { name: "工商司法信息", id: 3 },
  { name: "征信信息", id: 4 },
  { name: "出额度", id: 5 }
];

const detailInfo = {
  canpanyerList: [
    { name: "张三", type: 0, money: 600, bl: 80 },
    { name: "李四", type: 1, money: 600, bl: 60 }
  ]
};

const basicReporter = [
  {
    name: null,
    idCard: null,
    queryAgency: null, //查询机构
    queryReason: null,
    reportTime: null
  }
];

const creditTradingList = [
  {
    accountType: "loan",
    businessType: "个人住房贷款",
    accountCount: null,
    firstMonth: null
  },
  {
    accountType: "loan",
    businessType: "个人商用房贷款（包括商住两用房）",
    accountCount: null,
    firstMonth: null
  },
  {
    accountType: "loan",
    businessType: "其它类贷款",
    accountCount: null,
    firstMonth: null
  },
  {
    accountType: "creditCard",
    businessType: "贷记卡",
    accountCount: null,
    firstMonth: null
  },
  {
    accountType: "creditCard",
    businessType: "准贷记卡",
    accountCount: null,
    firstMonth: null
  }
];

const creditOverdueList = [
  {
    accountType: "非循环贷账户",
    accountCount: null,
    overMonth: null,
    overAmount: null,
    overMonthCount: null
  },
  {
    accountType: "循环贷账户一",
    accountCount: null,
    overMonth: null,
    overAmount: null,
    overMonthCount: null
  },
  {
    accountType: "循环贷账户二",
    accountCount: null,
    overMonth: null,
    overAmount: null,
    overMonthCount: null
  },
  {
    accountType: "贷记卡账户",
    accountCount: null,
    overMonth: null,
    overAmount: null,
    overMonthCount: null
  },
  {
    accountType: "准贷记卡账户",
    accountCount: null,
    overMonth: null,
    overAmount: null,
    overMonthCount: null
  }
];

const creditDebtLoopList = [
  {
    agencyCount: null,
    accountCount: null,
    creditAmount: null,
    balance: null,
    avgAmount6: null,
    titleType: 1,
    title: "非循环贷账户信息汇总"
  },
  {
    agencyCount: null,
    accountCount: null,
    creditAmount: null,
    balance: null,
    avgAmount6: null,
    titleType: 2,
    title: "循环贷账户一信息汇总"
  },
  {
    agencyCount: null,
    accountCount: null,
    creditAmount: null,
    balance: null,
    avgAmount6: null,
    titleType: 3,
    title: "循环贷账户二信息汇总"
  }
];

const creditDebtLoanList = [
  //贷记卡账户信息汇总
  {
    hairClipCount: null,
    accountCount: null,
    creditAmount: null,
    maxAmount: null,
    minAmount: null,
    usedAmount: null,
    avgAmount6: null,
    titleType: "creditAccount",
    title: "贷记卡账户信息汇总"
  },
  {
    hairClipCount: null,
    accountCount: null,
    creditAmount: null,
    maxAmount: null,
    minAmount: null,
    usedAmount: null,
    avgAmount6: null,
    titleType: "quasiCreditAccount",
    title: "准贷记卡账户信息汇总"
  }
];

const creditDebtDutyList = [
  {
    accountCount: null,
    dutyAmount: null,
    balance: null,
    dutyType: "guarantee", // 1担保责任 2 其它相关责任
    type: "person" // 1 为个人 2 为企业
  },
  {
    accountCount: null,
    dutyAmount: null,
    balance: null,
    dutyType: "other",
    type: "person"
  },
  {
    accountCount: null,
    dutyAmount: null,
    balance: null,
    dutyType: "guarantee",
    type: "company"
  },
  {
    accountCount: null,
    dutyAmount: null,
    balance: null,
    dutyType: "other",
    type: "company"
  }
];

const oneMonthdictNum = [
  {
    loanApprovalDept: null,
    cardApprovalDept: null
  }
];
const oneMonthsearchNum = [
  {
    loanApprovalNum: null,
    cardApprovalNum: null,
    ownQueryNum: null
  }
];

const twoYearSearchNum = [
  {
    loanManage: null,
    guaranteeQualification: null,
    merchantApproval: null
  }
];
const creditQueryCounts = [
  {
    standType: 1,
    monthQueryCount1: null,
    monthQueryCount2: null,
    monthQueryCount3: null,
    monthQueryCount6: null,
    monthQueryCount12: null,
    monthQueryCount24: null
  },
  {
    standType: 2,
    monthQueryCount1: null,
    monthQueryCount2: null,
    monthQueryCount3: null,
    monthQueryCount6: null,
    monthQueryCount12: null,
    monthQueryCount24: null
  }
];
const creditPersonOverdues = [
  {
    lastType: "1",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  },
  {
    lastType: "2",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  },
  {
    lastType: "3",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  },
  {
    lastType: "4",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  },
  {
    lastType: "5",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  },
  {
    lastType: "6",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  },
  {
    lastType: "7",
    statusCount1: null,
    statusCount2: null,
    statusCount3: null,
    statusCount4: null,
    statusCount5: null,
    statusCount6: null,
    statusCount7: null
  }
];

const rules = {
  threeSixStatus: [
    { required: true, message: "请选择有无三连累六", trigger: "change" }
  ],
  accountStatus: [
    { required: true, message: "请选择用户状态", trigger: "change" }
  ],
  fiveTypeStatus: [
    {
      required: true,
      message: "请选择五级分类",
      trigger: "change"
    }
  ]
};

const configTabList = [
  { name: "客户标签", id: 0 },
  { name: "意向标签", id: 1 },
  { name: "通话标签", id: 2 },
  { name: "跟进标签", id: 3 }
];

const customerTabList = [
  { name: "客户信息", id: 0 },
  { name: "基本信息", id: 1 },
  { name: "客户征信", id: 2 },
  { name: "公司主营", id: 3 },
  { name: "补充信息", id: 4 },
  { name: "沟通历史记录", id: 5 }
];

const campanyRules = {
  'enterpriseInfo.taxpayerName': [
    {
      required: true,
      message: "请输入公司名称",
      trigger: "blur"
    }
  ],
  'enterpriseInfo.provinceId': [
    {
      required: true,
      message: "请选择省份",
      trigger: "blur"
    }
  ],
  'enterpriseInfo.creditCode': [
    {
      required: true,
      message: "请输入税号",
      trigger: "blur"
    }
  ],
  'enterpriseInfo.password': [
    {
      required: true,
      message: "请输入税务密码",
      trigger: "blur"
    }
  ],
  'enterpriseInfo.legalPerson': [
    {
      required: true,
      message: "请输入法人",
      trigger: "blur"
    }
  ],
  'enterpriseInfo.phone': [
    {
      required: true,
      message: "请输入联系方式",
      trigger: "blur"
    }
  ]
};

export {
  rules,
  datePickerOptions,
  tabList,
  detailInfo,
  basicReporter,
  creditTradingList,
  creditOverdueList,
  creditDebtLoopList,
  creditDebtLoanList,
  creditDebtDutyList,
  oneMonthdictNum,
  oneMonthsearchNum,
  twoYearSearchNum,
  creditQueryCounts,
  creditPersonOverdues,
  configTabList,
  customerTabList,
  campanyRules
};
